package com.lin.chapter33.chapter1.mediator;

public class Mediator extends AbsMediator {
	@Override
	public void up(ISalary salary) {
		upSalary();
		upTax();
	}

	@Override
	public void up(IPosition position) {
		upPosition();
		upSalary();
		upTax();
	}

	@Override
	public void up(ITax tax) {
		upTax();
		downSalary();
	}

	@Override
	public void down(ISalary salary) {
		downSalary();
		downTax();
	}

	@Override
	public void down(IPosition position) {
		downPosition();
		downSalary();
		downTax();
	}

	@Override
	public void down(ITax tax) {
		downTax();
		upSalary();
	}

	private void upSalary(){
		System.out.println("工资上涨");
	}

	private void upTax(){
		System.out.println("税收上升");
	}

	private void upPosition(){
		System.out.println(" 职位上升");
	}

	private void downSalary(){
		System.out.println("工资降低");
	}

	private void downTax(){
		System.out.println("税收降低");
	}

	private void downPosition(){
		System.out.println("职位降低");
	}
}
